package com.ubc417.project.megastore.data;

import com.google.appengine.api.datastore.DatastoreService;
import com.google.appengine.api.datastore.DatastoreServiceFactory;
import com.google.appengine.api.datastore.Entity;
import com.google.appengine.api.datastore.Query;
import com.google.appengine.api.datastore.Query.Filter;
import com.google.appengine.api.datastore.Query.FilterOperator;

public class Users {
	public static Entity CreateUser(String username, String password){
		Entity userEntity = new Entity("User");
		userEntity.setProperty("username", username);
		userEntity.setProperty("password", password);
		
		DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
		ds.put(userEntity);
		
		return userEntity;
		
	}
	
	public static Boolean DeleteUser(String username){
		DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
		Query ds_query = new Query("User").setFilter(new Query.FilterPredicate("username", FilterOperator.EQUAL, username));
		
		Key keysToDelte [] = new Key[]
		
		if(ds.dele)
	}
	
}
